// ...解构会创建数组,后面约束数组类型
function buildName(firstName: string, ...restOfName: string[]):String {
  return firstName + " " + restOfName.join(" ");
}

let employeeName = buildName("Joseph", "Samuel", "Lucas", "MacKinzie", 21);



function buildName2(firstName: string, ...restOfName: string[]) {
  return firstName + " " + restOfName.join(" ");
}

let buildNameFun: (fname: string, ...rest: string[]) => String = buildName2;